require(['jquery',
         'global',
         'underscore',
         'module/util',
         'module/popup',
         'module/ajax',
         'bootstrap',
         'pixeladmin',
         'viewer',
         'requirejs/domready!'],
function($, global, _, util){
	
	window.PixelAdmin.start();//初始化菜单
	var _position = $(".information-vm");
	var _param = _position.find("[name='isbnInformationId']").val();;
	var _imgPrefix = $("#pagePreURL").val();
	
	
	var fillInformationData = function(data, position, imgPrefix) {
		debugger;
		
		$.ajax({
			url : global.context + '/web/isbninformation/getInformationData',
			data : {
				isbnInformationId : data
			},
			type : 'POST',
			async: false,
			success : function(result) {
				debugger;
				
				if (result) {
					var _returnData = JSON.parse(result.data);
					
					util.fillInput(position, _returnData);
					
					var coverImg = position.find("div.col-sm-12").find("img");
					$.each(coverImg, function() {
						var serviceUrl = $(this).attr("src");
						$(this).attr("src", imgPrefix + serviceUrl);
					})
				}
			},
			error : function(e) {
				alert("数据查询失败！");
			}
		});
	}
	
	var bindEvent = function() {
		
		fillInformationData(_param, _position, _imgPrefix);
	}
	
	// init start
	var init  = function() {
		bindEvent();
	};
	
	init();
})